package com.hmall.common.client;


import com.hmall.common.dto.Item;
import com.hmall.common.dto.PageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@FeignClient(value = "itemservice")
public interface SearchFeignClient {

    @GetMapping("/item/list?page={page}&size={size}")
    PageDTO<Item> getlist(@PathVariable(value = "page") Integer page,
                          @PathVariable(value = "size") Integer size);

    @GetMapping("/item/{id}")
    public Item findItemById(@PathVariable("id") Long id);

}
